package cn.jxufe.controller;

import java.util.List;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.jxufe.bean.EasyUIData;
import cn.jxufe.bean.EasyUIDataPageRequest;
import cn.jxufe.bean.Message;
import cn.jxufe.entity.Farm;
import cn.jxufe.entity.FarmView;
import cn.jxufe.entity.Seed;
import cn.jxufe.service.FarmService;
import cn.jxufe.service.FarmViewService;
import cn.jxufe.service.SeedService;

/***
 * user seed farm cropsGrow表的级联视图
 * @author Banner
 *
 */
@Controller
@RequestMapping("farmView")
public class FarmViewController {
	@Autowired
    private FarmViewService farmViewService;
	
	/***
	 * 获取数据库中所有的farmView.
	 * @return farmView列表
	 */
	@RequestMapping("list")
	public List<FarmView> list() {
		return farmViewService.list();
	}
	
	/***
	 * 跳转到farm/game.jsp页面.
	 * @param session 请求
	 * @param model model
	 * @return String
	 */
	@RequestMapping("game")
	public String grid(HttpSession session, Model model) {
		return "farm/game";
	}
}
